﻿namespace S.Parturition.Infrastructure
{
    public interface IBaseRepository<T>
    {

        /// <summary>
        /// 异步添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<bool> AddAsync(T t);

        /// <summary>
        /// 异步修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(T t);

        /// <summary>
        /// 异步删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(int id);

        /// <summary>
        /// 异步查询显示
        /// </summary>
        /// <returns></returns>
        Task<List<T>> GetAllAsync();

        /// <summary>
        /// 异步批量添加数据
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<bool> AddAllAsync(List<T> t);


    }
}